FROM centos:centos6
MAINTAINER He Kaihao <1157173310@qq.com>

RUN yum -y install openssh-server epel-release pwgen wget && \
    yum -y install pwgen && \
    rm -f /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_rsa_key && \
    ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key && \
    ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key && \
    sed -i "s/#UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config && \
    sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config && \
    wget http://down.wdlinux.cn/in/lanmp_wdcp_ins.sh && \
    sh lanmp_wdcp_ins.sh

ADD set_root_pw.sh /set_root_pw.sh
ADD run.sh /run.sh
RUN chmod +x /*.sh

ENV AUTHORIZED_KEYS **None**

EXPOSE 22
EXPOSE 8080
EXPOSE 80
EXPOSE 3306
CMD ["/run.sh"]